WorkForceTable data;

float plotX1, plotY1;
float plotX2, plotY2;
float labelX, labelY;

float mCareerStaff;
float fCareerStaff;
PFont font35, font25, fontA;
int diameter;
int[][] myArray;

void setup(){
  size(500, 500);
  //noStroke();
  smooth();
  //background(#add8e6);
  background(255);
  diameter = 380;
  
  data = new WorkForceTable("WorkforceProfile08-09.tsv");
  
  // Values
  mCareerStaff = norm(1331,0,2910);
  fCareerStaff = norm(1579,0,2910);
  
  fontA = loadFont("Ziggurat-HTF-Black-32.vlw");
  textFont(fontA, 32);   

  font35 = loadFont("ArialNarrow-35.vlw"); 
  
  
  fill(#eeeeee);
  noStroke();
  ellipse(width/2, height/2, diameter+5, diameter+5);
  
  /*float[] angs = {mCareerStaff*360,fCareerStaff*360};
  float lastAng = 0;
  for (int i = 0; i < angs.length; i++){
    // Set the color
    color green = color(174*i,221*i,20*i);
    fill(green,angs[i]/3);
  
    // Draw the arc
    arc(width/2, height/2, diameter, diameter, lastAng, lastAng+radians(angs[i]));
    lastAng += radians(angs[i]);  
  }*/  
  drawLabels();
}

void draw(){
    //fill(0);
    //color green = color(174*i,221*i,20*i);
    fill(174,221,20);
    // Draw the arc multiply 360 by the product of radians(percent)
    arc(width/2, height/2, diameter, diameter, 0.0, radians(mCareerStaff)*360);
}

void drawLabels(){
  fill(130);

  text("Workforce Profile", 15, 40); 
  textFont(font35, 35); 
  text(data.getRowCount()+" Total",15,height-10);
}
